package NetEase;

import java.util.Scanner;

/**
 * @author zhangmin
 * @create 2022-03-27 10:25
 */
public class 网易_2021_3 {
    public static void main(String[] args) {
        Scanner cin=new Scanner(System.in);
        char[] lines = cin.nextLine().toCharArray();
        int n=lines.length;
        int[] dp=new int[n];
        for (int i = 0; i < n; i++) {
            if (i==0){
                dp[i]=1;
            }else {
                dp[i]=dp[i-1];
                if (lines[i-1]=='1'){
                    //可以和前一位一起
                    dp[i]+=i-2>=0?dp[i-2]:1;
                }
                if (i-2>=0&&lines[i-2]=='1'){
                    //可以组合成三个一起
                    dp[i]+=i-3>=0?dp[i-3]:1;
                }
            }
        }
        System.out.println(dp[n-1]);
    }
}
